package Modelo;

import Controlador.CPrincipal;
import VO.VOMensaje;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class Cliente extends UnicastRemoteObject implements ICliente{
    private IServidor server;
    public CPrincipal cp;
    
    public Cliente(IServidor server, CPrincipal cp) throws RemoteException{
        this.server = server;
        this.cp = cp;
    }

    public Cliente() throws RemoteException{
        
    }


    public synchronized void recibir(VOMensaje m) throws RemoteException {
        try {
            this.cp.Recibir(m);
        } catch (Exception ex) {
            System.out.println(ex);
        }
    }
}
